package com.add.springboot.configure;

import com.add.springboot.service.SumService;
import com.add.springboot.service.impl.SumServiceImpl;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author e-Yuanyuan.Xu
 */
@Configuration
@ConditionalOnClass(value = {SumService.class, SumServiceImpl.class})
public class AddConfig {


    @Bean
    @ConditionalOnMissingBean
    SumService starterService() {
        return new SumServiceImpl();
    }
}
